<template>
    <input type="num" :value="props.modelValue" @input="change">
</template>

<script setup lang="ts">
const props = defineProps(['modelValue'])
const emit = defineEmits(["update:modelValue"]);

const change = (e: Event) => {
    emit("update:modelValue", (e.target! as HTMLInputElement).value);
};
</script>

<style scoped>
input {
    height: 25px;
    border: 1px solid rgba(255, 255, 255, 0);
    font-size: 12px;
    background-color: var(--color-fill-4);
    color: white;
    border-radius: 3px;
    width: 108px;
    box-sizing: border-box;
    padding: 0 0 0 5px;
    outline: none;
    transition: all .3s;
    max-width: 100%;
}
input:hover {
    border: 1px solid rgba(255, 255, 255, 0.3);
}
input:focus {
    border: 1px solid rgba(245, 70, 70);
}
</style>